PATHMac OS 8 and 9 Developer Documentation > Human Interface Toolbox > Window Manager >

Programming With the Mac OS 8.5 Window Manager


CreateNewWindow

Creates a window from parameter data.

pascal OSStatus CreateNewWindow (
                     WindowClass windowClass,
                     WindowAttributes attributes,
                     const Rect *bounds,
                     WindowPtr *outWindow);
windowClass
A value of type WindowClass. You pass a WindowClass constant that categorizes the type of window to be created. The window class cannot be altered once the window has been created. See Window Class Constants for a description of possible values for this parameter.
attributes
An unsigned 32-bit value of type WindowAttributes . You set the bits in a WindowAttributes field to specify certain features and logical attributes of the window to be created. See Window Attribute Constants for descriptions of possible values for this parameter.
bounds
A pointer to a structure of type Rect . Before calling CreateNewWindow , set the rectangle to specify the size and position of the new window's content region, in global coordinates.
outWindow
A pointer to a value of type WindowPtr . On return, the window pointer points to the newly created window.
function result
A result code. See Result Codes.
DISCUSSION

The CreateNewWindow function creates a window based on the attributes and class you specify in the attributes and windowClass parameters. CreateNewWindow sets the new window's content region to the size and location specified by the rectangle passed in the bounds parameter, which in turn determines the dimensions of the entire window. The Window Manager creates the window invisibly and places it at the front of the window list. After calling CreateNewWindow , you should set any desired associated data--using Window Manager or Control Manager accessor functions--then call the function TransitionWindow to display the window. See Creating a Window for a sample application-defined window-creation function.

VERSION NOTES

Available with Mac OS 8.5 and later.


© 1999 Apple Computer, Inc. – (Last Updated 18 March 99)